<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<div class="pageContent">
	<form method="post" action="<c:url value='/repair/edit?navTabId=repairList&callbackType=closeCurrent'/>"
		class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
		<input type="hidden" name="id" value="${repair.id}" />
		<div class="pageFormContent" layoutH="56">
			<p>
				<label>客户：</label> <input name="customer" type="text" size="30" value="${repair.customer}"
					<c:if test="${repair.customer != null && repair.customer != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
			</p>
			<p>
				<label>所属业务员：</label> <input name="salesman" type="text" size="30" value="${repair.salesman}"
					<c:if test="${repair.salesman != null && repair.salesman != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if>
					<c:if test="${repair.salesman == null || repair.salesman == '' || sessionInfo.role == '管理员' || sessionInfo.role == '财务'}">suggestFields="salesman"
					suggestUrl="<c:url value='/showSalesmanSuggest' />" lookupGroup=""</c:if> />
			</p>
			<p>
				<label>产品及型号：</label> <input name="product" type="text" size="30" value="${repair.product}"
					<c:if test="${repair.product != null && repair.product != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
			</p>
			<p>
				<label>机身号：</label> <input name="imei" type="text" size="30" value="${repair.imei}"
					<c:if test="${repair.imei != null && repair.imei != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
			</p>
			<p>
				<label>故障及特点：</label> <input name="fault" type="text" size="30" value="${repair.fault}"
					<c:if test="${repair.fault != null && repair.fault != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
			</p>

			<div class="divider"></div>

			<p>
				<label>从客户取回日期：</label> <input name="takeFromCustomer"
					<c:if test="${repair.takeFromCustomer == null || repair.takeFromCustomer == '' || sessionInfo.role == '管理员' || sessionInfo.role == '财务'}">class="date"</c:if>
					type="text" readonly="true" dateFmt="yyyy-M-d" value="${repair.takeFromCustomer}" />
				<c:if
					test="${repair.takeFromCustomer == null || repair.takeFromCustomer == '' || sessionInfo.role == '管理员' || sessionInfo.role == '财务'}">
					<a class="inputDateButton" href="javascript:;">选择</a>
				</c:if>
			</p>
			<p>
				<label>经手人：</label> <input name="takeFromCustomerHandling" type="text" size="30"
					<c:if test="${repair.takeFromCustomerHandling != null && repair.takeFromCustomerHandling != ''}">value="${repair.takeFromCustomerHandling}"</c:if>
					<c:if test="${repair.takeFromCustomerHandling == null || repair.takeFromCustomerHandling == ''}">value="${sessionInfo.realname}"</c:if>
					<c:if test="${repair.takeFromCustomerHandling != null && repair.takeFromCustomerHandling != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
			</p>

			<div class="divider"></div>

			<p>
				<label>送修日期：</label> <input name="repairDatetime"
					<c:if test="${repair.repairDatetime == null || repair.repairDatetime == '' || sessionInfo.role == '管理员' || sessionInfo.role == '财务'}">class="date"</c:if>
					type="text" readonly="true" dateFmt="yyyy-M-d" value="${repair.repairDatetime}" />
				<c:if
					test="${repair.repairDatetime == null || repair.repairDatetime == '' || sessionInfo.role == '管理员' || sessionInfo.role == '财务'}">
					<a class="inputDateButton" href="javascript:;">选择</a>
				</c:if>
			</p>
			<p>
				<label>经手人：</label> <input name="repairHandling" type="text" size="30"
					<c:if test="${repair.repairHandling != null && repair.repairHandling != ''}">value="${repair.repairHandling}"</c:if>
					<c:if test="${repair.repairHandling == null || repair.repairHandling == ''}">value="${sessionInfo.realname}"</c:if>
					<c:if test="${repair.repairHandling != null && repair.repairHandling != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
			</p>
			<p>
				<label>送修备注：</label> <input name="repairRemarks" type="text" size="30" value="${repair.repairRemarks}"
					<c:if test="${repair.repairRemarks != null && repair.repairRemarks != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
			</p>

			<div class="divider"></div>

			<p>
				<label>取回日期：</label> <input name="takeBackDatetime"
					<c:if test="${repair.takeBackDatetime == null || repair.takeBackDatetime == '' || sessionInfo.role == '管理员' || sessionInfo.role == '财务'}">class="date"</c:if>
					type="text" readonly="true" dateFmt="yyyy-M-d" value="${repair.takeBackDatetime}" />
				<c:if
					test="${repair.takeBackDatetime == null || repair.takeBackDatetime == '' || sessionInfo.role == '管理员' || sessionInfo.role == '财务'}">
					<a class="inputDateButton" href="javascript:;">选择</a>
				</c:if>
			</p>
			<p>
				<label>经手人：</label> <input name="takeBackHandling" type="text" size="30"
					<c:if test="${repair.takeBackHandling != null && repair.takeBackHandling != ''}">value="${repair.repairHandling}"</c:if>
					<c:if test="${repair.takeBackHandling == null || repair.takeBackHandling == ''}">value="${sessionInfo.realname}"</c:if>
					<c:if test="${repair.takeBackHandling != null && repair.takeBackHandling != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
			</p>

			<div class="divider"></div>

			<p>
				<label>送还客户日期：</label> <input name="returnCustomerDatetime"
					<c:if test="${repair.returnCustomerDatetime == null || repair.returnCustomerDatetime == '' || sessionInfo.role == '管理员' || sessionInfo.role == '财务'}">class="date"</c:if>
					type="text" readonly="true" dateFmt="yyyy-M-d" value="${repair.returnCustomerDatetime}" />
				<c:if
					test="${repair.returnCustomerDatetime == null || repair.returnCustomerDatetime == '' || sessionInfo.role == '管理员' || sessionInfo.role == '财务'}">
					<a class="inputDateButton" href="javascript:;">选择</a>
				</c:if>
			</p>
			<p>
				<label>经手人：</label> <input name="returnCustomerHandling" type="text" size="30"
					<c:if test="${repair.returnCustomerHandling != null && repair.returnCustomerHandling != ''}">value="${repair.returnCustomerHandling}"</c:if>
					<c:if test="${repair.returnCustomerHandling == null || repair.returnCustomerHandling == ''}">value="${sessionInfo.realname}"</c:if>
					<c:if test="${repair.returnCustomerHandling != null && repair.returnCustomerHandling != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
			</p>
			<p>
				<label>送货单号：</label> <input name="deliveryNo" type="text" size="30" value="${repair.deliveryNo}"
					<c:if test="${repair.deliveryNo != null && repair.deliveryNo != '' && sessionInfo.role != '管理员' && sessionInfo.role != '财务'}">readonly="true"</c:if> />
			</p>

			<div class="divider"></div>

			<p>
				<label>备注：</label> <input name="remarks" type="text" class="text" size="30" value="${repair.remarks}" />
			</p>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">确定</button>
						</div>
					</div></li>
				<li><div class="button">
						<div class="buttonContent">
							<button type="button" class="close">取消</button>
						</div>
					</div></li>
			</ul>
		</div>
	</form>
</div>
